
/**
 *
 * 公共的全局变量data.js
 *
 * */
define(["htmlDom","config"], function (dom,config) {
    //所有的参数变量集合在这里
    var Data = {
        //页面DOM操作
        container: dom.container,       //页面canvas主画布
        hawkeye: dom.hawkeye,       //页面canvas鹰眼画布
        showDiv: dom.showDiv,       //页面属性展示框
        domTag: dom.domTag,       //标记属性展示框
        inputValue: dom.inputValue,       //标记属性输入框
        innertext: dom.innertext,
        tages: dom.tages,
        viewPicture: dom.viewPicture,

        modelContainer: {},         //模型管理容器
        modelGroupArray:[],         //模型组存储器
        modelArray: [],              //模型存储容器
        modelBoderArray: [],              //模型存边框储容器
        
        temporaryGroup: [],               //临时容器组
        showModelArray: [],               //显隐模型容器组
        modelIdIndex: [],                   //模型Id索引
        modelNameIndex: [],                   //模型Name索引
        
        temporary: null,               //临时容器
        measureGroup:{
            measureLine:null,
            distance:'',
            mesureFlag:true,
            measureArray:[],
            measureIdArray:[],
            measureIdPointArray:[],
            measureObject:{},
            measureLine:{},
            measurePoint: {
                startPoint: [],
            }
        },
        

    
        way:"http://127.0.0.1",
        path: "../API/Engine/3d/texture/1.jpg",     //贴图路径
        viewPicturePath: "../API/Engine/3d/texture/1.jpg",     //平面图层路径
    
    
        //本地测试模型路径
        modelURL: [
            //
            // //IFC 模型
            // {
            //     reference: "ifc",
            //     url: "canvas3D/modelData/SampleHouse-20183231439_PFM.json"
            // }
            
            
           // IFC 模型
           //
           //
           //  {
           //      reference: variable.model.reference,
           //      talbe:variable.model.talbe,
           //      url: variable.model.url
           //  }

            // // //GLTF模型

            // {
            //     reference: "gltf",
            //     talbe:"lls",
            //     url: "../API/Engine/3d/modelData/taopuhe.gltf"
            // }
            
            //DAE 模型
   //          //
   //
   //
   // {
   //              reference: "dae",
   //              name_key:"beng",
   //              url: "../API/Engine/3d/modelData/test.dae"
   //          }
   //
   //
            //
            
            //GeoJson 模型
            // {
            //     reference: "geo",
            //     url: "canvas3D/modelData/buildings.json"
            // }
    
            //dwgJson 模型
            // //
            // {
            //     reference: "dwg",
            //     url: "canvas3D/modelData/zhangmabeng1.json"
            // }
            
        ],

        //本地数据库参数
        indexedObject : {
        name:'BIMViewer',
        version:1,
        db:null,
        ojstore:initsObj.tables,
        table:[
            {
            id:1001,
        }
       
        ],
        ojTabMan:{},
    },                  //缓存数据列表
        element : document.body,                                //画布参数
        numberData : 1,                                        //相机默认参数
        hawkeyeNumberData : 1,                                        //鹰眼相机默认参数
        background: 0xb3b3b2,

        //camera相机参数
        cameraOriginalP: new THREE.Vector3(100,10,100),      //Camera初始点
        freeCamera:{    //自由相机
            name: "freecamera",
            view: 75,                           //视场角度
            position: new THREE.Vector3(0,70,0),     //相机位置
            area: 2000,              //可视范围
            lookat: new THREE.Vector3(),              //聚焦中心点
            id:2
        },
        OrbitCamera:{    //轨道相机
            name: "camera",
            view: 45,                           //视场角度
            position: new THREE.Vector3(100, 20,100 ),     //相机位置
            area: 20000,              //可视范围
            lookat: new THREE.Vector3(0,0,0),              //聚焦中心点
            id:1
        },
        hawkeyeCamera:{    //鹰眼轨道相机
            name: "hawkeyeCamera",
            view: 45,                           //视场角度
            position: new THREE.Vector3(0,0,0),     //相机位置
            area: 20000,              //可视范围
            lookat: new THREE.Vector3(),              //聚焦中心点
        },

        //剖面参数
        clipping:[
            new THREE.Plane(new THREE.Vector3(0, -1,0,), 0)
        ],
        
        //剖面测试数据
        clippingTest:{
            plan:[
                new THREE.Plane(new THREE.Vector3(0, -1, 0), -190),                  //0.png
                new THREE.Plane(new THREE.Vector3(0, -1, 0), -80),                  //1.png
                new THREE.Plane(new THREE.Vector3(0, -1, 0), 0),                  //2.png
                new THREE.Plane(new THREE.Vector3(0, 0, -1), 325),                  //3.png
                new THREE.Plane(new THREE.Vector3(0, -1, 0), 100),                  //4.png
                new THREE.Plane(new THREE.Vector3(0, 0, -1), 325),                  //5.png
            ],
            picture:[
                {
                    path:["../../Engine/3d/texture/image/0.png"],
                    width: 8000,
                    height: 15000,
                    map: '',
                    wrapS:10000,
                    wrapT:10000,
                    position: new THREE.Vector3(6700,-190,-300),
                    rotation: new THREE.Vector3(0,Math.PI/2,0),
                },                  //0.png
                {
                    path:["../../Engine/3d/texture/image/1.png"],
                    width: 12000,
                    height: 7500,
                    map: '',
                    wrapS:8000,
                    wrapT:8000,
                    position: new THREE.Vector3(6000,-80,-375),
                    rotation: new THREE.Vector3(0,0,0),
                },                  //1.png
                {
                    path:["../../Engine/3d/texture/tuzhi/2.jpg"],
                    width: 24000,
                    height: 18000,
                    map: '',
                    wrapS:20000,
                    wrapT:20000,
                    position: new THREE.Vector3(5300,0,-1700),
                    rotation: new THREE.Vector3(0,0,0),
                },                  //2.png
                {
                   path:["../../Engine/3d/texture/image/3.png"],
                   width: 18000,
                   height: 13000,
                   map: '',
                   wrapS:20000,
                   wrapT:20000,
                    position: new THREE.Vector3(7300,-280,325),
                    rotation: new THREE.Vector3(Math.PI/2,0,0),
                },                   //3.png
                {
                    path:["../../Engine/3d/texture/image/4.png"],
                    width: 14000,
                    height: 8000,
                    map: '',
                    wrapS:10000,
                    wrapT:10000,
                    position: new THREE.Vector3(6500,100,-750),
                    rotation: new THREE.Vector3(0,0,0),
                },                  //4.png
                {
                    path:["../../Engine/3d/texture/image/5.png"],
                    width: 11000,
                    height: 7500,
                    map: '',
                    wrapS:10000,
                    wrapT:10000,
                    position: new THREE.Vector3(5600,190,325),
                    rotation: new THREE.Vector3(Math.PI/2,0,0),
                },                  //5.png
            ],
        },
        
        
        //剖面体参数
        clippingCube:{
          width:250,
          height:100,
          depth:150,
          position:new THREE.Vector3(0,100,0),

        },

        //light参数
        AmbientLight: {
            name: "AmbientLight",
            type: "AmbientLight",
            intensity: 1,         //光线强度
            color: 0x404040,        //光线颜色
            position: new THREE.Vector3(0,0,0),        //光线颜色
        },//添加环境光
        PointLight: {
            name: "PointLight",
            type: "PointLight",
            intensity: 1,         //光线强度
            color: 0x404040,        //光线颜色
            position: new THREE.Vector3(0,20000,0),        //光线颜色
        },              //添加点光
        DirectionalLight: {
            name: "DirectionalLight",
            type: "DirectionalLight",
            intensity: 1,         //光线强度
            color: 0xffffff,        //光线颜色
            castShadow:false,        //阴影
            position: new THREE.Vector3(200,300,200)

        },//平行光
        
        //场景scene
        scene:{
            name: "scene",
            color: 0xb3b3b2,                //场景环境背景色   //0xb3b3b2默认色
            container: {},                  //场景模型收纳容器
            cameraList: {},               //相机列表
            lightList: {},               //灯光列表
            modelGroup: {},                 //模型分组
            childrenGroup: {},              //子模型分组
            modelArray: [],                 //模型总和
            textureArray: [],               //纹理总和
            cameraGroup: [],               //相机管理器
            lightGroup: [],               //灯光管理器

        },
        render:{
            // color: Vm.colorOpion.curClore,
        },
        sceneEye:{
            name: "hawkeye",
            color: null,                //场景环境背景色
            container: {},                  //场景模型收纳容器
            cameraList: {},               //相机列表
            lightList: {},               //灯光列表
            modelGroup: {},                 //模型分组
            childrenGroup: {},              //子模型分组
            modelArray: [],                 //模型总和
            textureArray: [],               //纹理总和
            cameraGroup: [],               //相机管理器
            lightGroup: [],               //灯光管理器
        },  //鹰眼场景


        //平面图层贴图路径
        planImage:[
            "../../Engine/3d/texture/image/2.png",
        ],
        
        pointPictur:"../../Engine/3d/texture/ball.png",
        
        //平面图层参数
        planeParameter:{
            width: 240,
            height: 180,
            map: '',
            position: new THREE.Vector3(0,0,0),
            rotation: new THREE.Vector3(0,0,0),
            wrapS:200,
            wrapT:200
        },
        
        //Orbit相机控制参数
        orbitControl:{
            camera: null,
            enabled: true,
            target: new THREE.Vector3(),
            minDistance: 0,
            maxDistance: Infinity,
            enablePan: true,
            enableKeys: false,
        },

        //预设视角
        cameraView: [
            '{"metadata":{"version":4.5,"type":"Object","generator":"Object3D.toJSON"},"object":{"uuid":"6DFD021F-9AA9-47E5-A7A9-88D7AC3CA1B1","type":"PerspectiveCamera","name":"camera","matrix":[0.5280678506503685,6.938893903907228e-18,0.8492021815265786,0,0.043494465122359625,0.9986874952275746,-0.02704659645487853,0,-0.8480875996105709,0.05121803272357506,0.5273747590762254,0,200,20,200,1],"children":[{"uuid":"1990BFA0-36CB-47DB-962B-27C187F57385","type":"Object3D","matrix":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}],"fov":45,"zoom":1,"near":1,"far":200,"focus":10,"aspect":1.9712525667351128,"filmGauge":35,"filmOffset":0}}'
        ]

     






   };
    return Data;
});